package org.csmzxy.class2333;

import java.util.Scanner;

public class Shuixianhuashu {
    public static void main(String[] args){
        Scanner scanner=new Scanner(System.in);
        System.out.print("请输入一个三位数：");
        int number=scanner.nextInt();
        int hundreds = number/100;
        int tens=(number%100)/10;
        int  units=number%10;
        int sum=(int)(Math.pow(hundreds,3)+Math.pow(tens,3)+Math.pow(units,3));
        if (sum==number){
            System.out.println(number+"是水仙花数。");
        }
        else{
            System.out.println(number+"不是水仙花数。");
        }
        scanner.close();
    }
}
